﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPlus.Master" AutoEventWireup="true" CodeBehind="wbfrm_Creditos.aspx.cs" Inherits="FrontEndPlus.Módulos.RRHH.wbfrm_Creditos" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="CSS/Textbox.css" />
    <link type="text/css" rel="stylesheet" href="CSS/Boton.css" />
    <link type="text/css" rel="stylesheet" href="CSS/Popup.css" />

    <style type="text/css">
        .auto-style2
        {
            width: 260px;
        }

        .auto-style3
        {
            width: 475px;
        }
        .auto-style4 {
            width: 220px;
        }
    </style>

    <script type="text/javascript" src="JS/Popup/jquery.js"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $('#open').click(function () {
                $('#popup').fadeIn('slow');
                $('.popup-overlay').fadeIn('slow');
                $('.popup-overlay').height($(window).height());
                return false;
            });

            $('#close').click(function () {
                $('#popup').fadeOut('slow');
                $('.popup-overlay').fadeOut('slow');
                return false;
            });
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Image ID="img_background" runat="server" Height= "130px" Width= "150px" ImageUrl="~/Módulos/RRHH/Resources/credito.png" />
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <h2>Credito</h2>

    <table style="width: 100%;" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <table style="width: 100%;" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left">
                            <table style="width: 100%;" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="center" class="auto-style3">
                                        <a href="#" id="open">Realizar Cuotas Extraordinarias</a>
                                    </td>
                                    <td align="left">
                                        <label>Cod. Empleado:</label>
                                        <br />
                                        <br />
                                        <asp:TextBox ID="txt_cod_Empleado" runat="server" CssClass="txtRRHH" Width="135px" Height="20px" OnTextChanged="txt_cod_Empleado_TextChanged" AutoPostBack="True"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <table style="width: 100%;" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="left" class="auto-style4">
                                        <label>Cedula:</label>
                                        <br />
                                        <br />
                                        <asp:TextBox ID="txt_cedula" runat="server" ReadOnly="True" CssClass="txtRRHH" Width="150px" Height="20px"></asp:TextBox>
                                    </td>
                                    <td align="left">
                                        <label>Nombre Completo:</label>
                                        <br />
                                        <br />
                                        <asp:TextBox ID="txt_nombre_Completo" runat="server" ReadOnly="True" CssClass="txtRRHH" Width="245px" Height="20px"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <table style="width: 100%;" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="left" class="auto-style4">
                                        <label>Monto Prestamo:</label>
                                        <br />
                                        <br />
                                        <asp:TextBox ID="txt_monto_Prestamo" runat="server" CssClass="txtRRHH" Width="150px" Height="20px" maxLength="15"></asp:TextBox>
                                        <br />
                                        <asp:RequiredFieldValidator ID="rfv_monto_Prestamo" runat="server" ErrorMessage="Ingrese un monto para el prestamo" ControlToValidate="txt_monto_Prestamo" CssClass="msjerror" Display="Dynamic" ForeColor="Maroon"></asp:RequiredFieldValidator>
                                        <br />
                                        <asp:RangeValidator ID="rv_monto_Prestamo" runat="server" ControlToValidate="txt_monto_Prestamo" CssClass="msjerror" ErrorMessage="Ingrese un monto valido" ForeColor="Maroon" MaximumValue="99999999" MinimumValue="0" Display="Dynamic"></asp:RangeValidator>
                                    </td>
                                    <td align="left">
                                        <label>Plazo:</label>
                                        <br />
                                        <br />
                                        <asp:DropDownList ID="dplt_plazo" runat="server" Height="25px" Width="150px" AutoPostBack="True" OnSelectedIndexChanged="dplt_plazo_SelectedIndexChanged">
                                            <asp:ListItem>Seleccione un plazo</asp:ListItem>
                                            <asp:ListItem>12</asp:ListItem>
                                            <asp:ListItem>24</asp:ListItem>
                                            <asp:ListItem>48</asp:ListItem>
                                        </asp:DropDownList>
                                        <br />
                                        <asp:RequiredFieldValidator ID="rfv_plazo" runat="server" ErrorMessage="Seleccione un plazo" ControlToValidate="dplt_plazo" CssClass="msjerror" Display="Dynamic" ForeColor="Maroon"></asp:RequiredFieldValidator>
                                        <br />
                                        <br />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <br />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td></td>
        </tr>
        <tr>
            <td align="left">
                <label>Tipo Credito:</label>
                <br />
                <br />
                <asp:RadioButtonList ID="rdobtnlt_tipo_Credito" runat="server" RepeatDirection="Horizontal" Width="500px" OnSelectedIndexChanged="rdobtnlt_tipo_Credito_SelectedIndexChanged" AutoPostBack="True">
                    <asp:ListItem Value="1">Personal</asp:ListItem>
                    <asp:ListItem Value="2">Vivienda</asp:ListItem>
                    <asp:ListItem Value="3">Vehiculo</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td>
                <br />
            </td>
        </tr>
        <tr>
            <td align="left">
                <asp:MultiView ID="mtvw_tipo_Prestamo" runat="server">
                    <asp:View ID="vw_prestamo_Personal" runat="server">
                        <table style="width: 100%;" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="center">
                                    <asp:GridView ID="gv_prestamo_Personal" runat="server" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="2" Width="650px" CellSpacing="1">
                                        <AlternatingRowStyle BackColor="#DCDCDC" />
                                        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                                        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                                        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                        <SortedAscendingHeaderStyle BackColor="#0000A9" />
                                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                        <SortedDescendingHeaderStyle BackColor="#000065" />
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </asp:View>
                    <asp:View ID="vw_prestamo_Diversos" runat="server">
                        <table style="width: 100%;" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <asp:Label ID="lbl_prima" runat="server" Text="Prima:"></asp:Label>
                                    <br />
                                    <br />
                                    <asp:TextBox ID="txt_prima" runat="server" CssClass="txtRRHH"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:GridView ID="gv_prestamo_Diversos" runat="server" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="2" Width="650px" CellSpacing="1">
                                        <AlternatingRowStyle BackColor="#DCDCDC" />
                                        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                                        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                                        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                        <SortedAscendingHeaderStyle BackColor="#0000A9" />
                                        <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                        <SortedDescendingHeaderStyle BackColor="#000065" />
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </asp:View>
                </asp:MultiView>
            </td>
        </tr>
        <tr>
            <td>
                <br />
            </td>
        </tr>
        <tr align="center">
            <td>
                <asp:Button ID="btn_aprobacion_Prestamo" runat="server" CssClass="shiny-button" Text="Aprobacion Prestamo" OnClick="btn_aprobacion_Prestamo_Click" Visible="False" />
                <asp:Button ID="btn_calcular_Prestamo" runat="server" CssClass="shiny-button" Text="Calcular Prestamo" OnClick="btn_calcular_Prestamo_Click" />
            </td>
        </tr>
    </table>

    <div id="popup" style="display: none;">
        <div class="content-popup">
            <div class="close">
                <a href="#" id="close">
                    <img src="Resources/Popup/close.png" alt="Close" />
                </a>
            </div>
            <div>
                <h2>Cuotas Extraordinarias</h2>

                <table style="width: 100%;" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <table style="width: 100%;" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="left" class="auto-style2">
                                        <label>Cedula:</label>
                                        <br />
                                        <br />
                                        <asp:TextBox ID="txt_popup_cedula" runat="server" ReadOnly="True" CssClass="txtRRHH" Width="150px" Height="15px"></asp:TextBox>
                                    </td>
                                    <td align="left">
                                        <label>Nombre Completo:</label>
                                        <br />
                                        <br />
                                        <asp:TextBox ID="txt_popup_nombre_Completo" runat="server" ReadOnly="True" CssClass="txtRRHH" Width="150px" Height="15px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <br />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label>Cuota a Pagar:</label>
                                        <asp:Label ID="lbl_cuota_Pagar" runat="server" Text="0"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <br />
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Button ID="btn_realizar_Pago" runat="server" Text="Realizar Pago" CssClass="shiny-button" OnClick="btn_realizar_Pago_Click" />
                        </td>
                    </tr>
                </table>
            </div>

        </div>
    </div>
    <div class="popup-overlay"></div>
</asp:Content>
